package com.qdlc.p2p.dal.dto;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.qdlc.p2p.common.constant.Global;

/**
 * 积分兑换记录实体
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "score_convert")
public class ScoreConvert {

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** 会员ID */
    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "user_id")
    private User user;

    /** 商品ID */
    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "goods_id")
    private Goods goods;

    /** 兑换的积分数值   单个商品积分 */
    private int score;

    /** 实际的兑换金额 = score * convertNum */
    private double money;

    /** 兑换数量 */
    private int convertNum;

    /** 用户备注 */
    private String remark;

    /** 状态,0:待审核,1:审核通过,-1:审核未通过,2:已发货,3:已收货 */
    private int status;

    /** 添加时间 */
    private Date addTime;

    /** 审核人ID */
    @ManyToOne(fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    @JoinColumn(name = "verify_operator_id")
    private Operator verifyOperator;

    /** 审核时间 */
    private Date verifyTime;

    /** 审核备注 */
    private String verifyRemark;

    /** 发货时间 */
    private Date deliverTime;

    /** 收件人 */
    private String receiver;

    /** 收件人手机号码 */
    private String receiveMobile;

    /** 收件人电话 */
    private String receivePhone;

    /** 收件地址 */
    private String receiveAddress;

    /** 收货时间 */
    private Date receiveTime;

    /** 快递名称 */
    private String courierName;

    /** 快递单号 */
    private String courierNum;

    /**
     * 获取主键ID
     *
     * @return 主键ID
     */
    public long getId() {
        return id;
    }

    /**
     * 设置主键ID
     *
     * @param id 要设置的主键ID
     */
    public void setId(long id) {
        this.id = id;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    /**
     * 获取兑换的积分数值   单个商品积分
     *
     * @return 兑换的积分数值   单个商品积分
     */
    public int getScore() {
        return score;
    }

    /**
     * 设置兑换的积分数值   单个商品积分
     *
     * @param score 要设置的兑换的积分数值   单个商品积分
     */
    public void setScore(int score) {
        this.score = score;
    }

    /**
     * 获取实际的兑换金额
     *
     * @return 实际的兑换金额
     */
    public double getMoney() {
        return money;
    }

    /**
     * 设置实际的兑换金额
     *
     * @param money 要设置的实际的兑换金额
     */
    public void setMoney(double money) {
        this.money = money;
    }

    /**
     * 获取积分兑换份额
     *
     * @return 积分兑换份额
     */
    public int getConvertNum() {
        return convertNum;
    }

    /**
     * 设置积分兑换份额
     *
     * @param convertNum 要设置的积分兑换份额
     */
    public void setConvertNum(int convertNum) {
        this.convertNum = convertNum;
    }

    /**
     * 获取用户备注
     *
     * @return 用户备注
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置用户备注
     *
     * @param remark 要设置的用户备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 获取状态：0未审核，1审核通过，2审核不通过，-1无用数据
     *
     * @return 状态：0未审核，1审核通过，2审核不通过，-1无用数据
     */
    public int getStatus() {
        return status;
    }

    /**
     * 设置状态：0未审核，1审核通过，2审核不通过，-1无用数据
     *
     * @param status 要设置的状态：0未审核，1审核通过，2审核不通过，-1无用数据
     */
    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * 获取添加时间
     *
     * @return 添加时间
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置添加时间
     *
     * @param addTime 要设置的添加时间
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Operator getVerifyOperator() {
        return verifyOperator;
    }

    public void setVerifyOperator(Operator verifyOperator) {
        this.verifyOperator = verifyOperator;
    }

    /**
     * 获取审核时间
     *
     * @return 审核时间
     */
    public Date getVerifyTime() {
        return verifyTime;
    }

    /**
     * 设置审核时间
     *
     * @param verifyTime 要设置的审核时间
     */
    public void setVerifyTime(Date verifyTime) {
        this.verifyTime = verifyTime;
    }

    /**
     * 获取审核备注
     *
     * @return 审核备注
     */
    public String getVerifyRemark() {
        return verifyRemark;
    }

    /**
     * 设置审核备注
     *
     * @param verifyRemark 要设置的审核备注
     */
    public void setVerifyRemark(String verifyRemark) {
        this.verifyRemark = verifyRemark;
    }

    /**
     * 获取发货时间
     *
     * @return 发货时间
     */
    public Date getDeliverTime() {
        return deliverTime;
    }

    /**
     * 设置发货时间
     *
     * @param deliverTime 要设置的发货时间
     */
    public void setDeliverTime(Date deliverTime) {
        this.deliverTime = deliverTime;
    }

    /**
     * 获取收件人
     *
     * @return 收件人
     */
    public String getReceiver() {
        return receiver;
    }

    /**
     * 设置收件人
     *
     * @param receiver 要设置的收件人
     */
    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    /**
     * 获取收件人手机号码
     *
     * @return 收件人手机号码
     */
    public String getReceiveMobile() {
        return receiveMobile;
    }

    /**
     * 设置收件人手机号码
     *
     * @param receiveMobile 要设置的收件人手机号码
     */
    public void setReceiveMobile(String receiveMobile) {
        this.receiveMobile = receiveMobile;
    }

    /**
     * 获取收件人电话
     *
     * @return 收件人电话
     */
    public String getReceivePhone() {
        return receivePhone;
    }

    /**
     * 设置收件人电话
     *
     * @param receivePhone 要设置的收件人电话
     */
    public void setReceivePhone(String receivePhone) {
        this.receivePhone = receivePhone;
    }

    /**
     * 获取收件地址
     *
     * @return 收件地址
     */
    public String getReceiveAddress() {
        return receiveAddress;
    }

    /**
     * 设置收件地址
     *
     * @param receiveAddress 要设置的收件地址
     */
    public void setReceiveAddress(String receiveAddress) {
        this.receiveAddress = receiveAddress;
    }

    /**
     * 获取收货时间
     *
     * @return 收货时间
     */
    public Date getReceiveTime() {
        return receiveTime;
    }

    /**
     * 设置收货时间
     *
     * @param receiveTime 要设置的收货时间
     */
    public void setReceiveTime(Date receiveTime) {
        this.receiveTime = receiveTime;
    }

    /**
     * 获取快递名称
     *
     * @return 快递名称
     */
    public String getCourierName() {
        return courierName;
    }

    /**
     * 设置快递名称
     *
     * @param courierName 要设置的快递名称
     */
    public void setCourierName(String courierName) {
        this.courierName = courierName;
    }

    /**
     * 获取快递单号
     *
     * @return 快递单号
     */
    public String getCourierNum() {
        return courierNum;
    }

    /**
     * 设置快递单号
     *
     * @param courierNum 要设置的快递单号
     */
    public void setCourierNum(String courierNum) {
        this.courierNum = courierNum;
    }
}


